package com.gpframework.common.constant;


/**
 * 缓存常量信息
 *
 * @Author gpframework
 */
public class CacheConstants {


    /**
     * 分组标识
     */
    public static final String PACKET_IDENTIFICATION = ":";

    /**
     * 常量0
     */
    public static final String ZERO = "0";

    /**
     * 缓存标识
     */
    public static final String CACHE_KEY_WORD = "-1";

    /**
     * 品牌信息缓存
     */
    public static final String CACHE_BRAND_INFO = "cache_brand_info:";

    /**
     * 门店缓存信息
     */
    public static final String CACHE_STORE_INFO = "cache_store_info:";

    /**
     * 品牌下所有门店缓存信息
     */
    public static final String CACHE_BRAND_STORE_ALL_INFO = "cache_brand_store_all_info:";

    /**
     * 用户缓存
     */
    public static final String CACHE_USER_INFO = "cache_user_info:";

    /**
     * 员工缓存
     */
    public static final String CACHE_EMPLOYEE_INFO = "cache_employee_info:";

    /**
     * 已过期的缓存
     */
    public static final String CACHE_DESTRUCTION_KEY = "destruction:";
    /**
     * 导入缓存
     */
    public static final String CACHE_IMPORT_INFO = "import_info:";

    /**
     * 导入会员卡缓存
     */
    public static final String CACHE_MEMBER_CARD_KEY = "CMC:";

    /**
     * 导入会籍合同缓存
     */
    public static final String CACHE_MEMBER_CONTRACT_KEY = "MC:";

    /**
     * 导入私教合同缓存
     */
    public static final String CACHE_PERSONAL_TRAINING_CONTRACT_KEY = "PTC:";

    /**
     * 导入实体卡缓存
     */
    public static final String CACHE_PHYSICAL_CARD_KEY = "PC:";

    /**
     * 导入课程信息缓存
     */
    public static final String CACHE_COURSE_INFO_KEY = "CI:";

    /**
     * 导入员工信息缓存
     */
    public static final String CACHE_EMPLOYEES_INFO_KEY = "EI:";

    /**
     * 导入租柜合同信息缓存
     */
    public static final String CACHE_CABINET_CONTRACT_KEY = "CC:";

    /**
     * 导入私教预约缓存
     */
    public static final String CACHE_COURSE_BOOKING_KEY = "CB:";

    /**
     * 缓存过期时间(5分钟)
     */
    public static final Long CACHE_OVERDUE_FIVE = 5L;

    /**
     * 缓存过期时间(10分钟)
     */
    public static final Long CACHE_OVERDUE_TEN = 10L;

    /**
     * 缓存过期时间(15分钟)
     */
    public static final Long CACHE_FIFTEEN = 15L;

    /**
     * 缓存过期时间(一小时)
     */
    public static final Long CACHE_OVERDUE_AN_HOUR = 60L;

    /**
     * 缓存过期时间(两小时)
     */
    public static final Long CACHE_OVERDUE_TWO_HOURS = 120L;

    /**
     * 缓存过期时间（二十小数）
     */
    public static final Long CACHE_OVERDUE_TWENTY_HOURS = 20L;

    /**
     * 缓存过期时间（一天）
     */
    public static final Long CACHE_OVERDUE_ONE_DAY = 24L;

    /**
     * 普通access_token常量
     */
    public static final String ACCESS_TOKEN = "access_token";

    /**
     * 导入缓存标识
     */
    public static final String IMPORT_RECORD_KEY = "import_record_key:";

    /**
     * 导入记录idkey
     */
    public static final String IMPORT_ID_KEY = "import_id_key:";

    /**
     * 订单信息key
     */
    public static final String ORDER_INFO_KEY = "order_info:";

    /**
     * 品牌access_token常量
     */
    public static final String BRAND_ACCESS_TOKEN = "brand_access_token:";

    /**
     * 品牌微信信息缓存
     */
    public static final String BRAND_WX_INFO = "brand_wx_info:";

    /**
     * 绑定手机验证码缓存常量
     */
    public static final String BIND_MOBILE = "cache_bind_mobile:";

    /**
     * 修改密码手机验证码常量
     */
    public static final String EMPLOYEE_UPDATE_PASSWORD = "employee_update_password:";

    /**
     * 品牌订单缓存key
     */
    public static final String BRAND_ORDER = "brand_order_";

    /**
     * 用户入场二维码常量
     */
    public static final String USER_ENTRANCE_QR_CODE = "user_entrance_qr_code:";

    /**
     * 实体卡缓存
     */
    public static final String CACHE_PHYSICAL_CARD_INFO = "cache_physical_card_info:";

    /**
     * 品牌的门店列表信息
     */
    public static final String CACHE_BRAND_STORE_LIST = "cache_brand_store_list:";

    /**
     * 门店员工
     */
    public static final String CACHE_STORE_EMPLOYEES_LIST = "cache_store_employees_list:";

    /**
     * 团课预约
     */
    public static final String RESERVATION_LEAGUE = "reservation_league:";

    /**
     * 课程预约
     */
    public static final String RESERVATION_COURSE = "reservation_course:";

    /**
     * uni-ubi token缓存key
     */
    public static final String UNI_UBI_FACE_TOKEN = "uni_ubi_face_token:";

    /**
     * 是否存在uni-ubi设备缓存
     */
    public static final String UNI_UBI_DEVICE = "uni_ubi_device:";

    /**
     * 门店设备缓存
     */
    public static final String BASE_DEVICE_INFO = "base_device_info:";

    /**
     * 用户人脸缓存key
     */
    public static final String RECEPTION_USERID_SETID = "reception_userid_setid:";
    /**
     * 业务数据缓存Key
     */
    public static final String BUSINESS_DATA_CACHE = "business_data_cache:";
    /**
     * 入场信息key
     */
    public static final String ENTRANCE_MSG = "entrance_msg:";

    /**
     * 品牌小程序目录 pc
     */
    public static final String BRAND_WX_MENU_PC = "brand_wx_menu_pc:";

    /**
     * 品牌小程序目录 微信
     */
    public static final String BRAND_WX_MENU_WX = "brand_wx_menu_wx:";
    /**
     * 会籍合同延期标识
     */
    public static final String MEMBER_CONTRACT_DELAY = "member_contract_delay:";
    /**
     * 私教合同延期标识
     */
    public static final String COURSE_CONTRACT_DELAY = "course_contract_delay:";
    /**
     * 会员订单
     */
    public static final String MEMBER_ORDER = "member_order:";

    /**
     * 会员订单编号
     */
    public static final String MEMBER_ORDER_CODE = "member_order_code:";

    /**
     * 获取分页的key
     *
     * @param brandId
     * @param storeId
     * @param page
     * @param size
     * @return
     */
    public static String getCacheKey(Long brandId, Long storeId, Integer page, Integer size) {
        String key = "";
        if (brandId != null) {
            key += brandId + CacheConstants.PACKET_IDENTIFICATION;
        }
        if (storeId != null) {
            key += storeId + CacheConstants.PACKET_IDENTIFICATION;
        }
        if (page != null) {
            key += page;
        }
        if (size != null) {
            key += CacheConstants.PACKET_IDENTIFICATION + size;
        }
        return key;
    }
}
